<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <link rel="stylesheet" href="index.css">
  <title>Document</title>
</head>

<body>
  <style>
    main {
      width: 100%;
      height: 229px;
      display: flex;
      justify-content: center;
      align-items: center;
    }

    span {
      display: inline-block;
      width: 21ch;
      font: bold 200% Consolas, Monaco, monospace;
      /*等宽字体*/
      overflow: hidden;
      white-space: nowrap;
      font-weight: 500;
      border-right: 1px solid transparent;
      animation: typing 10s steps(12), caret .5s steps(1) infinite;
    }

    @keyframes typing {
      from {
        width: 0;
      }
    }

    @keyframes caret {
      50% {
        border-right-color: currentColor
      }
    }
  </style>
  <div>
    <main class="main">
      <span>前端GitHub</span>
    </main>
  </div>
  <script>
  </script>
</body>

</html>